<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>无标题文档</title>
    <link href="css/style.css" rel="stylesheet" type="text/css"/>
    <link href="css/select.css" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" src="js/jquery.js"></script>
    <script type="text/javascript" src="js/jquery.idTabs.min.js"></script>
    <script type="text/javascript" src="js/select-ui.min.js"></script>
    <script type="text/javascript" src="editor/kindeditor.js"></script>
    <script type="text/javascript" src="/layui/layui.js"></script>
</head>
<script type="text/javascript">
    $(document).ready(function (e) {
        $(".select1").uedSelect({
            width: 100
        });
    });
</script>
<script type="text/javascript">
    KE.show({
        id: 'content7',
        cssPath: './index.css'
    });
</script>
<body>
<div class="place">
    <span>位置：</span>
    <ul class="placeul">
        <li><a href="#">首页</a></li>
        <li><a href="#">公告处理</a></li>
        <li><a href="#">公告发布</a></li>

    </ul>
</div>
<div class="formbody">
    <c:if test="${announcement.id == null}" var="temp">
        <div class="formtitle"><span>公告发布</span></div>
        <form action="/submitCreateAnnouncement" method="post">
    </c:if>
    <c:if test="${announcement.id != null}" var="temp">
        <div class="formtitle"><span>公告修改</span></div>
        <form action="/doupdateAnnouncement?id=${announcement.id}" method="post">
    </c:if>
        <ul class="forminfo">
            <li><label>公告类型</label>
                <div class="vocation">
                    <select class="select1" name="typeid">
                        <c:forEach items="${announcementTypeList}" var="temp">
                            <c:if test="${announcement.typeid == temp.id}">
                                <option selected value="${temp.id}">${temp.type}</option>
                            </c:if>
                            <c:if test="${announcement.typeid != temp.id}">
                                <option value="${temp.id}">${temp.type}</option>
                            </c:if>
                        </c:forEach>
                    </select>
                </div>
            </li>
            <li><label>标题</label><input name="title" type="text" value="${announcement.title}" class="dfinput"/><i>标题不能超过30个字符</i></li>
            <li><label>内容</label>
                <textarea id="content7" name="content" style="width:700px;height:250px;visibility:hidden;">${announcement.content}</textarea>
            </li>
            <c:if test="${announcement.id == null}" var="temp">
                <li><label>&nbsp;</label><input name="" type="submit" class="btn" value="马上发布"/></li>
            </c:if>
            <c:if test="${announcement.id != null}" var="temp">
                <li><label>&nbsp;</label><input name="" type="submit" class="btn" value="确认修改"/></li>
            </c:if>

        </ul>
    </form>
</div>
</body>
</html>
